package com.lzj.service;

import com.lzj.dao.MeetingRoomMapper;
import com.lzj.entity.MeetingRoom;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @autor:lzj
 * @date:2022/3/1
 */
@Service
public class MeetingRoomServiceImpl implements MeetingRoomService {
    @Autowired
    private MeetingRoomMapper meetingRoomMapper;

    public void setMeetingRoomMapper(MeetingRoomMapper meetingRoomMapper) {
        this.meetingRoomMapper = meetingRoomMapper;
    }

    @Override
    public List<MeetingRoom> getAllMr() {
        return meetingRoomMapper.getAllMr();
    }

    @Override
    public MeetingRoom getMrById(int roomid) {
        return meetingRoomMapper.getMrById(roomid);
    }

    @Override
    public int updateRoom(MeetingRoom meetingRoom) {
        return meetingRoomMapper.updateRoom(meetingRoom);
    }

    @Override
    public int addMr(MeetingRoom meetingRoom) {
        return meetingRoomMapper.addMr(meetingRoom);
    }

    @Override
    public List<Integer> getMrIdByName(String roomname) {
        return meetingRoomMapper.getMrIdByName(roomname);
    }

}
